# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.676.14.9 -> 1.676.14.10 # drivers/acpi/include/acglobal.h 1.5.1.1 -> 1.5.1.2 # drivers/acpi/include/actypes.h 1.7.1.1 -> 1.7.1.2 # drivers/acpi/dispatcher/dsfield.c 1.5.1.1 -> 1.5.1.2 # drivers/acpi/include/platform/aclinux.h 1.7.1.1 -> 1.7.1.2 # drivers/acpi/ospm/thermal/tzpolicy.c 1.3.1.1 -> 1.3.2.1 # drivers/acpi/events/evevent.c 1.6.1.1 -> 1.6.1.2 # drivers/acpi/os.c 1.8.1.2 -> 1.8.3.1 # drivers/acpi/executer/exstore.c 1.8.1.1 -> 1.8.1.2 # drivers/acpi/ospm/ec/ectransx.c 1.2.1.1 -> 1.2.2.1 # drivers/acpi/ospm/busmgr/bm_osl.c 1.5.1.1 -> 1.5.2.1 # drivers/acpi/utilities/utdebug.c 1.5.1.1 -> 1.5.1.2 # drivers/acpi/namespace/nsdump.c 1.2.1.1 -> 1.2.1.2 # drivers/acpi/dispatcher/dswexec.c 1.6.1.1 -> 1.6.1.2 # drivers/acpi/include/platform/acgcc.h 1.8.1.1 -> 1.8.1.2 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/09/27 bjorn_helgaas@hp.com 1.676.14.10 # Revert x86-64 ACPI changes so acpi-20020517-2.4.18.diff applies cleanly. # -------------------------------------------- # diff -Nru a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c --- a/drivers/acpi/dispatcher/dsfield.c Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/dispatcher/dsfield.c Wed Oct 8 09:07:12 2003 @@ -181,7 +181,7 @@ acpi_status status; - PROC_NAME("acpi_ds_get_field_names"); + FUNCTION_TRACE_U32 ("Ds_get_field_names", info); /* First field starts at bit zero */ diff -Nru a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c --- a/drivers/acpi/dispatcher/dswexec.c Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/dispatcher/dswexec.c Wed Oct 8 09:07:12 2003 @@ -577,7 +577,7 @@ (walk_state->control_state->common.state == CONTROL_PREDICATE_EXECUTING) && (walk_state->control_state->control.predicate_op == op)) { - status = acpi_ds_get_predicate_value (walk_state, !! walk_state->result_obj); + status = acpi_ds_get_predicate_value (walk_state, (u32) walk_state->result_obj); walk_state->result_obj = NULL; } diff -Nru a/drivers/acpi/events/evevent.c b/drivers/acpi/events/evevent.c --- a/drivers/acpi/events/evevent.c Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/events/evevent.c Wed Oct 8 09:07:12 2003 @@ -683,7 +683,7 @@ acpi_ev_asynch_execute_gpe_method ( void *context) { - unsigned long gpe_number = (unsigned long) context; + u32 gpe_number = (u32) context; acpi_gpe_level_info gpe_info; @@ -800,7 +800,7 @@ */ else if (gpe_info.method_handle) { if (ACPI_FAILURE(acpi_os_queue_for_execution (OSD_PRIORITY_GPE, - acpi_ev_asynch_execute_gpe_method, (void*) (u64)gpe_number))) { + acpi_ev_asynch_execute_gpe_method, (void*) gpe_number))) { /* * Shoudn't occur, but if it does report an error. Note that * the GPE will remain disabled until the ACPI Core Subsystem diff -Nru a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c --- a/drivers/acpi/executer/exstore.c Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/executer/exstore.c Wed Oct 8 09:07:12 2003 @@ -181,8 +181,8 @@ case ACPI_TYPE_PACKAGE: - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Elements - %p\n", - source_desc->package.elements)); + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Elements - 0x%X\n", + (u32) source_desc->package.elements)); break; diff -Nru a/drivers/acpi/include/acglobal.h b/drivers/acpi/include/acglobal.h --- a/drivers/acpi/include/acglobal.h Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/include/acglobal.h Wed Oct 8 09:07:12 2003 @@ -156,7 +156,7 @@ ACPI_EXTERN u32 acpi_gbl_current_node_count; ACPI_EXTERN u32 acpi_gbl_current_node_size; ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count; -ACPI_EXTERN unsigned long acpi_gbl_entry_stack_pointer; +ACPI_EXTERN u32 acpi_gbl_entry_stack_pointer; ACPI_EXTERN u32 acpi_gbl_lowest_stack_pointer; ACPI_EXTERN u32 acpi_gbl_deepest_nesting; #endif diff -Nru a/drivers/acpi/include/actypes.h b/drivers/acpi/include/actypes.h --- a/drivers/acpi/include/actypes.h Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/include/actypes.h Wed Oct 8 09:07:12 2003 @@ -48,11 +48,8 @@ * UCHAR Character. 1 byte unsigned value. */ -#ifndef BITS_PER_LONG -#error "define BITS_PER_LONG" -#endif -#if BITS_PER_LONG == 64 +#ifdef _IA64 /* * 64-bit type definitions */ @@ -65,7 +62,7 @@ typedef COMPILER_DEPENDENT_UINT64 UINT64; typedef UINT64 NATIVE_UINT; -typedef long long NATIVE_INT; +typedef INT64 NATIVE_INT; typedef NATIVE_UINT ACPI_TBLPTR; typedef UINT64 ACPI_IO_ADDRESS; @@ -75,7 +72,7 @@ #define ACPI_USE_NATIVE_DIVIDE /* Native 64-bit integer support */ -#elif BITS_PER_LONG == 16 +#elif _IA16 /* * 16-bit type definitions */ @@ -112,7 +109,7 @@ #define ACPI_NO_INTEGER64_SUPPORT -#elif BITS_PER_LONG == 32 +#else /* * 32-bit type definitions (default) */ @@ -133,9 +130,6 @@ #define ALIGNED_ADDRESS_BOUNDARY 0x00000004 #define _HW_ALIGNMENT_SUPPORT - -#else -#error "unknown BITS_PER_LONG" #endif diff -Nru a/drivers/acpi/include/platform/acgcc.h b/drivers/acpi/include/platform/acgcc.h --- a/drivers/acpi/include/platform/acgcc.h Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/include/platform/acgcc.h Wed Oct 8 09:07:12 2003 @@ -92,7 +92,8 @@ /*! [End] no source code translation !*/ -#elif __i386__ /* DO IA32 */ +#else /* DO IA32 */ + #define COMPILER_DEPENDENT_UINT64 unsigned long long #define ACPI_ASM_MACROS #define causeinterrupt(level) @@ -137,60 +138,31 @@ "andl $0x1,%%eax" \ :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \ } while(0) -#elif __x86_64__ -#define COMPILER_DEPENDENT_UINT64 unsigned long long -#define ACPI_ASM_MACROS -#define causeinterrupt(level) -#define BREAKPOINT3 -#define disable() __cli() -#define enable() __sti() -#define halt() __asm__ __volatile__ ("sti; hlt":::"memory") -/*! [Begin] no source code translation - * - * A brief explanation as GNU inline assembly is a bit hairy - * %0 is the output parameter in RAX ("=a") - * %1 and %2 are the input parameters in RCX ("c") - * and an immediate value ("i") respectively - * All actual register references are preceded with "%%" as in "%%edx" - * Immediate values in the assembly are preceded by "$" as in "$0x1" - * The final asm parameter are the operation altered non-output registers. + +/* + * Math helper asm macros */ -#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ - do { \ - unsigned long dummy; \ - asm("1: movl (%2),%%eax;" \ - "movl %%eax,%%edx;" \ - "andq %2,%%rdx;" \ - "btsl $0x1,%%edx;" \ - "adcl $0x0,%%edx;" \ - "lock; cmpxchgl %%edx,(%1);" \ - "jnz 1b;" \ - "cmpb $0x3,%%dl;" \ - "sbbl %%eax,%%eax" \ - :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~1L):"dx"); \ - } while(0) +#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ + asm("divl %2;" \ + :"=a"(q32), "=d"(r32) \ + :"r"(d32), \ + "0"(n_lo), "1"(n_hi)) -#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ - do { \ - unsigned long dummy; \ - asm("1: movl (%2),%%eax;" \ - "movl %%eax,%%edx;" \ - "andq %2,%%rdx;" \ - "lock; cmpxchgl %%edx,(%1);" \ - "jnz 1b;" \ - "andl $0x1,%%eax" \ - :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \ - } while(0) + +#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ + asm("shrl $1,%2;" \ + "rcrl $1,%3;" \ + :"=r"(n_hi), "=r"(n_lo) \ + :"0"(n_hi), "1"(n_lo)) /*! [End] no source code translation !*/ -#endif +#endif /* IA 32 */ /* This macro is used to tag functions as "printf-like" because * some compilers (like GCC) can catch printf format string problems. */ #define ACPI_PRINTF_LIKE_FUNC __attribute__ ((__format__ (__printf__, 4, 5))) - #endif /* __ACGCC_H__ */ diff -Nru a/drivers/acpi/include/platform/aclinux.h b/drivers/acpi/include/platform/aclinux.h --- a/drivers/acpi/include/platform/aclinux.h Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/include/platform/aclinux.h Wed Oct 8 09:07:12 2003 @@ -58,14 +58,5 @@ #undef DEBUGGER_THREADING #define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED -#if BITS_PER_LONG < 64 -/* Linux ia32 can't do int64 well */ -#define ACPI_NO_INTEGER64_SUPPORT -/* And the ia32 kernel doesn't include 64-bit divide support */ -#define ACPI_DIV64(dividend, divisor) do_div(dividend, divisor) -#else -#define ACPI_DIV64(dividend, divisor) ACPI_DIVIDE(dividend, divisor) -#endif - #endif /* __ACLINUX_H__ */ diff -Nru a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c --- a/drivers/acpi/namespace/nsdump.c Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/namespace/nsdump.c Wed Oct 8 09:07:12 2003 @@ -226,7 +226,7 @@ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_TABLES, " ID %d Addr %.4X Len %.4X\n", obj_desc->processor.proc_id, obj_desc->processor.address, - (unsigned)obj_desc->processor.length)); + obj_desc->processor.length)); break; case ACPI_TYPE_DEVICE: diff -Nru a/drivers/acpi/os.c b/drivers/acpi/os.c --- a/drivers/acpi/os.c Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/os.c Wed Oct 8 09:07:12 2003 @@ -361,7 +361,7 @@ acpi_status acpi_os_write_memory( ACPI_PHYSICAL_ADDRESS phys_addr, - NATIVE_UINT value, + u32 value, u32 width) { switch (width) @@ -421,7 +421,7 @@ return (result ? AE_ERROR : AE_OK); } -ACPI_STATUS +acpi_status acpi_os_write_pci_configuration ( acpi_pci_id *pci_id, u32 reg, @@ -491,7 +491,7 @@ acpi_os_write_pci_configuration ( acpi_pci_id *pci_id, u32 reg, - NATIVE_UINT value, + u32 value, u32 width) { int devfn = PCI_DEVFN(pci_id->device, pci_id->function); diff -Nru a/drivers/acpi/ospm/busmgr/bm_osl.c b/drivers/acpi/ospm/busmgr/bm_osl.c --- a/drivers/acpi/ospm/busmgr/bm_osl.c Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/ospm/busmgr/bm_osl.c Wed Oct 8 09:07:12 2003 @@ -108,7 +108,7 @@ u32 event_data) { BM_OSL_EVENT *event = NULL; - unsigned long flags = 0; + u32 flags = 0; /* drop event on the floor if no one's listening */ if (!event_is_open) diff -Nru a/drivers/acpi/ospm/ec/ectransx.c b/drivers/acpi/ospm/ec/ectransx.c --- a/drivers/acpi/ospm/ec/ectransx.c Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/ospm/ec/ectransx.c Wed Oct 8 09:07:12 2003 @@ -104,7 +104,7 @@ acpi_status ec_io_read ( EC_CONTEXT *ec, - u32 io_port, + ACPI_IO_ADDRESS io_port, u8 *data, EC_EVENT wait_event) { @@ -139,7 +139,7 @@ acpi_status ec_io_write ( EC_CONTEXT *ec, - u32 io_port, + ACPI_IO_ADDRESS io_port, u8 data, EC_EVENT wait_event) { diff -Nru a/drivers/acpi/ospm/thermal/tzpolicy.c b/drivers/acpi/ospm/thermal/tzpolicy.c --- a/drivers/acpi/ospm/thermal/tzpolicy.c Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/ospm/thermal/tzpolicy.c Wed Oct 8 09:07:12 2003 @@ -413,7 +413,7 @@ if (timer_pending(&(policy->timer))) mod_timer(&(policy->timer), (HZ*sleep_time)/1000); else { - policy->timer.data = (unsigned long)tz; + policy->timer.data = (u32)tz; policy->timer.function = tz_policy_run; policy->timer.expires = jiffies + (HZ*sleep_time)/1000; add_timer(&(policy->timer)); diff -Nru a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c --- a/drivers/acpi/utilities/utdebug.c Wed Oct 8 09:07:12 2003 +++ b/drivers/acpi/utilities/utdebug.c Wed Oct 8 09:07:12 2003 @@ -57,7 +57,7 @@ u32 current_sp; - acpi_gbl_entry_stack_pointer = (unsigned long) ¤t_sp; + acpi_gbl_entry_stack_pointer = (u32) ¤t_sp; }